/*
* Copyright 2016 YONYOU Corporation Ltd. All Rights Reserved.
*
* This software is published under the terms of the YONYOU Software
* License version 1.0, a copy of which has been included with this
* distribution in the LICENSE.txt file.
*
* @Project         marketing

* @Package         com.yonyou.marketing.message.spi.webchattools

* @Author          LuZhen

* @FileName        WxMpTemplateMessageResponse

* @Date            2016/12/12

----------------------------------------------------------------------------------
*     Date          Who             Version         Comments
* 1. 2016/12/12        LuZhen          1.0             Create Source
*
----------------------------------------------------------------------------------
*/
package com.yonyou.gmmc.service.wechatpush.spi.webchattools;

import com.alibaba.fastjson.annotation.JSONField;

public class WxMpAddTemplateResponse {

    @JSONField(name="errcode")
    private Integer errorCode;

    @JSONField(name="errmsg")
    private String errorMessage;

    public String getTemplateId() {
        return templateId;
    }

    public void setTemplateId(String templateId) {
        this.templateId = templateId;
    }

    @JSONField(name="template_id")
    private String templateId;

    public Integer getErrorCode() {
        return errorCode;
    }

    public void setErrorCode(Integer errorCode) {
        this.errorCode = errorCode;
    }

    public String getErrorMessage() {
        return errorMessage;
    }

    public void setErrorMessage(String errorMessage) {
        this.errorMessage = errorMessage;
    }

    public boolean isSucceed(){
        return errorMessage!=null&&errorMessage.equalsIgnoreCase("ok");
    }

    @Override
    public String toString() {
        return "WxMpSendTemplateMessageResponse{" +
                "errorCode=" + errorCode +
                ", errorMessage='" + errorMessage + '\'' +
                ", templateId='" + templateId + '\'' +
                '}';
    }
}
